package com.ll.config;

import com.ll.interceptor.Authinterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import org.springframework.beans.factory.annotation.Autowired;

@Configuration
public class AuthinterceptorConfig implements WebMvcConfigurer {
    @Autowired
    private Authinterceptor authinterceptor;
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(authinterceptor)
                .addPathPatterns("/**")
                .excludePathPatterns("/user/login");
    }
}
